from ui.plotting import PlotGraphWidget
from core import cmds

class PlotGraph(ni.View):
    x = ni.Int()
    y = ni.Int()
    #plot = ni.Plot()
    #output = ni.Component(depends=(x,y,))
    widget = PlotGraphWidget
        
    def prepare_update(self):
        for widget in self.widgets:
            widget.clear()
    
    def compute_output(self):
        for widget in self.widgets:
            widget.plot(self.x, self.y)
        cmds.update_ui()
        return self.output
